<template>
    <div class="container">
        <p class="oneP">行业营销传播策略</p>
        <p class="twoP" style="font-weight:100">基于大数据分析结果，根据目标人群网络行为特征，由核心到外界，层层锁定价值流量。</p>
        <button class="oneButton" @click="toCreateAIPlan">一键生成方案</button>
        <div class="rowOne">
            <div class="rec1" v-for="(item,index) in arr1" :key="index" @mouseover="show(index)">
                <div class="rec1Son">
                    <div class="left">
                        <img :src="item[0]">
                        <img :src="item[4]">
                    </div>
                    <div class="right">
                        <p>{{item[1]}}</p>
                        <p>{{item[2]}}</p>
                    </div>
                </div>
            </div>
        </div>
        <mask-toast v-if="showMaskToast" @closeMask="closeMask"></mask-toast>
    </div>
</template>
<script>
require("../../assets/css/p.css");
const img1 = require("../../assets/img/lyzw/31.png");
const img2 = require("../../assets/img/lyzw/27.png");
const img4 = require("../../assets/img/lyzw/34.png");
const img5 = require("../../assets/img/lyzw/36.png");
const img6 = require("../../assets/img/lyzw/33.png");
const img7 = require("../../assets/img/lyzw/28.png");
const img9 = require("../../assets/img/lyzw/35.png");
const img10 = require("../../assets/img/lyzw/37.png");
const img11 = require("../../assets/img/二类电商/一键生成/col1.png");
const img12 = require("../../assets/img/二类电商/一键生成/col2.png");
import maskToast from '../upgrade/upgradeToast'
export default {
  data() {
    return {
      arr1: [
        [
          img1,
          "创意广告投放",
          "根据广告主的属性及其产品特性与人群定向分析，策划创意广告内容。",
          img6,
          img11
        ],
        [
          img2,
          "筛选目标用户",
          "基于智能大数据广告投放系统，锁定目标用户群，全面分析舆情动向。",
          img7,
          img11
        ],
        [
          img4,
          "效果数据报表",
          "实时追踪广告效果，将丰富的数据简单化且可视化，便于及时提升投放效果。",
          img9,
          img11
        ],
        [
          img5,
          "定制推广方案",
          "为企业提供一站式服务，提供咨询、方案、执行售后等全方位服务。",
          img10,
          img11
        ]
      ],
      debug: true,
      showMaskToast: false
    };
  },
  methods: {
    show(index) {
      // 初始化arr1
      this.arr1[0][0] = img1;
      this.arr1[1][0] = img2;
      this.arr1[2][0] = img4;
      this.arr1[3][0] = img5;
      this.arr1[0][3] = img6;
      this.arr1[1][3] = img7;
      this.arr1[2][3] = img9;
      this.arr1[3][3] = img10;
      for (let i = 0; i < this.arr1.length; i++) {
        this.arr1[i][4] = img11;
      }
      this.arr1[index].splice(0, 1, this.arr1[index][3]);
      this.arr1[index].splice(4, 1, img12);
    },
    toCreateAIPlan(){
      if(this.debug){
          this.showMaskToast = true
          return
      }
      this.$router.push({path:'/createAIPlan'});
    },
    closeMask(data){
      this.showMaskToast = data
    }
  },
  created: function(){
    this.arr1[0][0] = img6;
    this.arr1[0][4] = img12;
  },
  components: {
    maskToast
  }
};
</script>
<style scoped>
.container {
  width: 1200px;
  margin: 0 auto;
  text-align: center;
  margin-top: 80px;
  overflow: hidden;
}
.rowOne {
  overflow: hidden;
  margin-top: 60px;
  height: 589px;
  background: url("../../assets/img/二类电商/一键生成/bg.png");
  position: relative;
}
.rec1 {
  cursor: pointer;
}
.rec1:nth-child(1) {
  width: 414px;
  height: 180px;
  background: url("../../assets/img/二类电商/一键生成/circle.png");
  position: absolute;
  top: 106px;
  left: 0;
}
.rec1:nth-child(2) {
  width: 414px;
  height: 180px;
  background: url("../../assets/img/二类电商/一键生成/circle.png");
  position: absolute;
  top: 0;
  right: 90px;
}
.rec1:nth-child(3) {
  width: 414px;
  height: 180px;
  background: url("../../assets/img/二类电商/一键生成/circle.png");
  position: absolute;
  top: 330px;
  left: 47px;
}
.rec1:nth-child(4) {
  width: 414px;
  height: 180px;
  background: url("../../assets/img/二类电商/一键生成/circle.png");
  position: absolute;
  top: 227px;
  right: 0;
}
.rec1Son {
  width: 354px;
  height: 120px;
  margin-left: 30px;
  margin-top: 30px;
}
.left {
  float: left;
  width: 120px;
  height: 120px;
  text-align: center;
  line-height: 120px;
}
.left > img:nth-child(1) {
  margin-right: 15px;
}
.right {
  float: left;
  width: 234px;
  text-align: left;
}
.right > p:nth-child(1) {
  font-weight: bold;
  font-size: 18px;
  margin-top: 10px;
}
.right > p:nth-child(2) {
  font-size: 16px;
  margin-top: 18px;
  color: #222222;
}

.oneButton{
  width: 140px;
    box-shadow: 0px 4px 19px #ed9191;
}
</style>